package com.example.weather;

public class WeatherStation {
    public static void main(String[] args) {
        // 创建天气数据主题
        WeatherData weatherData = new WeatherData();

        // 创建并注册观察者
        CurrentConditionsDisplay currentDisplay = new CurrentConditionsDisplay(weatherData);
        StatisticsDisplay statisticsDisplay = new StatisticsDisplay(weatherData);

        // 更新气象数据
        weatherData.setMeasurements(80, 65, 30.4f);
        weatherData.setMeasurements(82, 70, 29.2f);
        weatherData.setMeasurements(78, 90, 29.2f);
    }
}
